/*
 * RealGeneticAlgorithmAdvancedParams.h
 *
 *  Created on: Oct 22, 2013
 *      Author: filipe
 */

#ifndef REALGENETICALGORITHMADVANCEDPARAMS_H_
#define REALGENETICALGORITHMADVANCEDPARAMS_H_

#include "GeneticAlgorithmAdvancedParameters.h"

namespace EvolutionaryOptimization
{
	class RealGeneticAlgorithmAdvancedParams : public EvolutionaryOptimization::GeneticAlgorithmAdvancedParameters<double>
	{
		protected:

			int _PopulationSize;
			int _Dimension;

			// TODO: ver por que nao funcionou colocar esse metodo na classe pai como abstrato
			virtual void _CreateDefaultStrategyParameters()
			{
				SetCrossover(new CrossoverStrategyBlend(_Dimension));
				SetMutation(new MutationStrategyGaussian(_Dimension));
				SetSelector(new SelectionStrategyTournament(_PopulationSize));
				SetDiversityAnalyser(new DiversityAnalysis());
			}

		public:

			RealGeneticAlgorithmAdvancedParams(int population_size, int dimension) : GeneticAlgorithmAdvancedParameters()
			{
				_PopulationSize = population_size;
				_Dimension = dimension;

				_CreateDefaultStrategyParameters();
			}

			virtual ~RealGeneticAlgorithmAdvancedParams()
			{
			}
	};
}

#endif
